package businesslogic;

import java.util.ArrayList;

import databaseservice.BookPOService;

import po.BookPO;
import businesslogic.network.RMIStubClient;
import businesslogicservice.SearchBookBLService;

public class SearchBookBLService_Stub implements SearchBookBLService{
	
	private BookPOService mBookPOService;
	
	public SearchBookBLService_Stub(RMIStubClient client){
		mBookPOService=client.bookPOService;
	}

	@Override
	public ArrayList<BookPO> searchBookByKey(BookPO o) {
		// TODO Auto-generated method stub
		try {
			return mBookPOService.search(o);
		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
			return null;
		}
		
	}

	@Override
	public ArrayList<BookPO> searchBookByType(int type) {
		// TODO Auto-generated method stub
		try {
			return mBookPOService.search(type);
		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
			return null;
			
		}
		
	}

}
